<template>
	<view>
		<view class="Descrip-container">
			<view class="Descrip-text">
				<view class="Descrip-text_top">主要描述</view>
				<u--textarea v-model="form.textarea" class="descrip_place"  placeholder="点击输入主要描述" count  maxlength="200">
					
				</u--textarea>
			</view>
			
			<view class="Descrip-save">
				<button type="primary" @click="save">完成</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					textarea: ''
				}
			}
		},
		onLoad: function(options) {
			var yewudesc = options.yewudesc;
			if (yewudesc != '' && yewudesc != undefined) {
				this.form.textarea = decodeURIComponent(yewudesc);
				// console.log(this.form.textarea);
			}
		},
		methods: {
			save: function(e) {
				// console.log(e);
				var pages = getCurrentPages();
				var prevPage = pages[pages.length - 2]; //上一个页面
				prevPage.yewudescedit = encodeURIComponent(this.form.textarea);
				uni.navigateBack();
			}

		}
	}
</script>

<style lang="scss" scoped>
	page {
		background-color: #eeeeee;
		height: 100%;
	}

	.Descrip-container {
		background-color: #fff;
		padding: 20rpx 0;
		margin-top: 15rpx;
	}

	.Descrip-save {
		width: 90%;
		margin: 30rpx 5% 20rpx;

		button {
			font-size: 30rpx;
		}
	}
	.Descrip-text{
		margin: 0 20rpx;
		
		&_top{
			padding-bottom: 20rpx;
		}
	}
	::v-deep .descrip_place {
		border-width: 1px !important;
		border-color: #eeeeee !important;
		.u-textarea__field{
			font-size: 13px;
			color: #333;
		}
	} 
</style>
